import React from 'react'
import styles from './agreement.less'
import { CloseOutlined } from '@ant-design/icons'
import { doc } from '@/pages/index/base64'
import { connect, history } from 'umi'

export default (props: any) => {

    return (
        <div className={styles.box}>
            <div className={styles.shadowBox}/>
            <div className={styles.popupBox}>
                <div className={styles.popupBoxTitle}>
                    <span className={styles.statement}>协议声明</span>
                    <span className={styles.closeBtn} onClick={props.closePopup}><CloseOutlined style={{ lineHeight: "40px" }} /></span>
                </div>
                <div className={styles.subPopuBoxTitle}>
                    <span>《小米商城用户协议》</span>、
                    <span>《小米商城隐私政策》</span>、
                    <span >《小米帐号用户协议》</span>、
                    <span>《小米帐号隐私政策》</span>
                    请您仔细阅读以上协议，其中有对您权利义务的特别约定等重要条款，同意后方可使用本软件
                </div>
                <div className={styles.content}>
                    <iframe id="J_agreementContentIframe" width="100%" height="300px" frameBorder="0" srcDoc={doc}/>
                </div>
                <div className={styles.popupBoxFooter}>
                    <button type="button" className={styles.okBtn} onClick={() => {
                        history.push('/auth/login')
                    }}>同意</button>
                    <button type="button" className={styles.noOkBtn} onClick={props.closePopup}>不同意</button>
                </div>
            </div>
        </div>
    )
}
